#include "GamePlayScene.h"
#include "MainLayer.h"
#include "HudLayer.h"
USING_NS_CC;

/**
 * Call this method to create the MainScene.
 */

GamePlayScene::GamePlayScene()
{
}

bool GamePlayScene::init()
{
	return true;
}

CCScene*
GamePlayScene::scene(b2Vec3 calibrationValues)
{
	// 'pScene' is an autorelease object
	CCScene* pScene = CCScene::create();

	// 'hudLayer' is an autorelease object
	HudLayer* hudLayer = HudLayer::create();

	// add the hudLayer as a child to the scene
	pScene->addChild(hudLayer, 1);

	// 'pMainLayer' is an autorelease object
	MainLayer* pMainLayer = MainLayer::node();
	pMainLayer->setCalibrationValues(calibrationValues);
	// pass the HudLayer pointer to the MainLayer so they can communicate
	pMainLayer->setHudLayer(hudLayer);
	pMainLayer->setTag(mainLayerTag);
	pScene->addChild(pMainLayer);

	return pScene;
}
